﻿using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace Zeenck.Models
{
    public class Registration
    {
        #region Property(s)

        [Required]
        [StringLength(20, MinimumLength = 4)]
        [Remote("IsUsernameAvaliable", "Validation")]
        [Display(Name = "Username")]
        [RegularExpression(@"(\S)+", ErrorMessage = "White space is not allowed")]
        public string ClientUserName { get; set; }

        [Required]
        [DataType(DataType.EmailAddress)]
        [Display(Name = "Email Address")]
        public string EmailAddress { get; set; }

        [Required]
        [Display(Name = "First Name")]
        public string FirstName { get; set; }

        [Required]
        [Display(Name = "Last Name")]
        public string LastName { get; set; }

        [Required]
        [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(Name = "Password")]
        public string NewPassword { get; set; }

        [Required]
        [DataType(DataType.Password)]
        [Display(Name = "Confirm password")]
        [Compare("NewPassword", ErrorMessage = "The password and confirmation password do not match.")]
        public string ConfirmPassword { get; set; }

        #endregion Property(s)
    }
}